1. Field of the Invention
The present invention relates to a counter for counting the number of pulses of a pulse signal outputted from an encoder, comparing the count value with a preset count value, and outputting a coincidence signal if the count value is substantially coincident with the preset count value.
2. Description of the Related Art
A large number of actuators such as cylinders have been hitherto used, for example, in production steps in order to transfer the workpiece. For example, FIG. 8 shows a production line 12 for transferring a workpiece 10 upwardly, and thereafter transferring the workpiece 10 in the horizontal direction. In this case, the production line 12 comprises a cylinder 14 and a cylinder 16. The cylinder 14 has a piston rod 18 which is displaceable in the vertical direction. A transport table 20 is secured to an end of the piston rod 18.
The cylinder 16 has a piston rod 22 which is displaceable in the horizontal direction. A pressing member 24 is secured to an end of the piston rod 22. The production line 12 has a table member 25 to which the pressing member 24 is approachable. Compressed air is supplied from a compressed air supply source 30 through valves 26, 28 to the cylinders 14, 16 respectively. The valves 26, 28 are controlled by a control unit 32. The cylinder 14 is provided with an encoder 31. The number of pulses of a pulse signal outputted from the encoder 31 is counted by the counter 33. Thus, the displacement position of the cylinder 14 is detected. Further, the control unit 32 contains a timer 34.
The workpiece 10 is transported by the production line 12 as follows. That is, when the workpiece 10 is placed on the transport table 20, the control unit 32 operates the valve 26 to introduce compressed air into the cylinder 14 so that the transport table 20 is lifted upwardly together with the workpiece 10.
During this process, the control unit 32 measures the time from the start of the operation of the cylinder 14 by the aid of the timer 34 provided separately from the counter 33. It is assumed that the operation of the cylinder 14 is completed at a point of time at which the measured time becomes the previously established predetermined preset time as shown in FIG. 9. On this assumption, the valve 28 is controlled to energize the cylinder 16. Accordingly, the pressing member 24 of the cylinder 16 is displaced to transfer the workpiece 10 from the transport table 20 to the table member 25.
However, in the case of the production line 12 as described above, in order to avoid the fear of occurrence of malfunction due to, for example, dispersion of the operation time of the cylinder 14, the predetermined preset time is set to contain the margin time or float. For this reason, both of the cylinders 14, 14 are in a stopped state during the margin time, giving rise to waste time. Therefore, a long period of time is required to transport the workpiece 10, and a problem arises in that the efficiency is lowered.
For example, if the cylinder 14 is abnormally operated in any manner, and the preset period has elapsed in a state in which the operation of the cylinder 14 is not stopped as shown in FIG. 10, then the cylinder 16 is operated although the margin time is taken into consideration. As a result, it is feared that the workpiece 10 is broken, or the cylinders 14, 16 themselves are damaged.